package com.lemon.smartsafetynew.ui.adapter.hidden;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.lemon.smartsafety.R;
import com.lemon.smartsafetynew.entity.hidden.SafeHiddenInfoItemVo;

import java.util.List;

import butterknife.Bind;
import kale.adapter.LemonRcvAdapter;
import kale.adapter.item.AdapterItem;

/**
 * Created by Andrew on 2017/9/11.
 */

public class SafeHiddenDetailInfoListAdapter extends LemonRcvAdapter<SafeHiddenInfoItemVo> {

    public SafeHiddenDetailInfoListAdapter(@Nullable List<SafeHiddenInfoItemVo> data) {
        super(data);
    }

    @NonNull
    @Override
    public AdapterItem createItem(Object type) {
        return new ItemAdapter();
    }

    private class ItemAdapter implements AdapterItem<SafeHiddenInfoItemVo> {

        private TextView labelOneTv;
        private TextView nameOneTv;
        private LinearLayout layoutOne;

        private TextView labelTwoTv;
        private TextView nameTwoTv;
        private LinearLayout layoutTwo;

        private TextView labelThreeTv;
        private TextView nameThreeTv;
        private LinearLayout layoutThree;

        private RecyclerView recyclerView;

        @Override
        public int getLayoutResId() {
            return R.layout.item_safe_hidden_detail_info;
        }

        @Override
        public void bindViews(View root) {

            labelOneTv = (TextView) root.findViewById(R.id.label_one_tv);
            nameOneTv = (TextView) root.findViewById(R.id.name_one_tv);
            layoutOne = (LinearLayout) root.findViewById(R.id.layout_one);

            labelTwoTv = (TextView) root.findViewById(R.id.label_two_tv);
            nameTwoTv = (TextView) root.findViewById(R.id.name_two_tv);
            layoutTwo = (LinearLayout) root.findViewById(R.id.layout_two);

            labelThreeTv = (TextView) root.findViewById(R.id.label_three_tv);
            nameThreeTv = (TextView) root.findViewById(R.id.name_three_tv);
            layoutThree = (LinearLayout) root.findViewById(R.id.layout_three);

            recyclerView = (RecyclerView) root.findViewById(R.id.recyclerView);

        }

        @Override
        public void setViews() {

        }

        @Override
        public void handleData(SafeHiddenInfoItemVo safeHiddenInfoItemVo, int position) {

            //TODO

        }
    }
}
